Load

Entity-Related Operation Statement

Syntax samples

LOAD <expression> {PERM}{IFF <Boolean expression>}{IN <time>}{,<priority>}

LOAD 5, 99

LOAD 5 IFF Attr3 > 2 IN 5 min

LOAD Pallet_Capacity

LOAD 5 PERM IN 10 min

Description

Loads a specified quantity of entities onto a base entity. Temporarily loaded entities retain their identity and may be unloaded with an UNLOAD statement. Permanently loaded entities, using the PERM option in the LOAD statement, do not retain their identity and cannot be unloaded later. Loaded entities must be routed to the loading location using the LOAD routing rule. Additional entities may be added to an entity’s existing load with additional LOAD statements. Use LOAD to model parts placed into a container or pallet when they must be removed later. If a base entity owns a resource when the entities are unloaded the resource stays with the base entity. Any resources owned by permanently loading entities are transferred automatically to the base entity. Any resources owned by temporary loading entities are kept and cannot be freed until the entities are unloaded.

Valid In

Operation logic only. A process may contain multiple load statements and no more than one UNLOAD statement following all LOAD statements. LOAD may not be used in the same process with SPLIT AS, CREATE, COMBINE, GROUP, or UNGROUP.

Components

<expression>

The number of entities to load onto the base entity. This expression is evaluated at the time the entity encounters the LOAD request.

PERM

This option causes the LOAD to behave the same as the JOIN statement. It will permanently join entities to the base entity executing the LOAD statement. Any resources owned by the permanently loading entities are transferred automatically to the base entity.

IFF <Boolean expression>

This option allows the LOAD command to be conditional. Any attributes, entity functions, or location functions apply to the entity to be loaded, not to the base entity. This technique allows only entities with certain properties to be loaded onto the base entity. To use attributes, entity functions, and location functions that apply to the base entity, assign the desired value to a local variable and use the local variable in the Boolean expression.

IN <time>

The entity will load entities up to the specified limit for this amount of time and then go on. Entities loaded with this option may have a load smaller than the specified amount.

<priority>

Waiting entities will load arriving entities by priority. This expression should be a number between 0 and 999.

Explicit Entity Actions

LOAD does not transfer cost or statistics of the loaded entity. However, if the PERM option is used, the cost of the loading entity does get transferred to the base entity.

Example

In this example, boxes are loaded onto a semi-truck. The quantity is determined by the value of the Truck’s attribute, Attr1. The resulting entity retains the name Truck and is sent on to its final destination, New York, Chicago, or Boston.

Process Table

Entity

Location

Operation (min)

Box

 

Shipping

WAIT 2 min

Truck

 

MfgSite

 

Truck

 

 

 

 

 

 

Dock

LOAD Attr1 IN 2 hr

Routing Table

Blk

Output

Destination

Rule

Move Logic

1

Box

Dock

LOAD 1

MOVE FOR 45 sec

1

Truck

Dock

FIRST 1

MOVE FOR 10 min

1

Truck

NewYork

FIRST 1

MOVE FOR 24 hr

Truck

Chicago

FIRST

MOVE FOR 12 hr

Truck

Boston

FIRST

MOVE FOR 28 hr

See Also

LOAD, GROUP, UNLOAD, ACCUM, COMBINE, JOIN, GROUPQTY(), and ENTITY(). Also see Attributes.